LibWeb: Avoid redundant wheel hit test target recording - #11139
Conversation
Avoid recording per-box wheel hit test targets when the viewport is the only wheel-scrollable candidate. The compositor already falls back to the viewport after checking blocking and main-thread wheel regions. Track non-viewport candidates while building the visual context tree, so viewport-only pages do not pay for another traversal. Memoize target resolution when element scrollers exist. Reject non-scrollable overflow styles before measuring overflow geometry. Add coverage for viewport fallback without explicit targets. Update display list expectations to omit the redundant commands.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (72)
💤 Files with no reviewable changes (64)
📝 WalkthroughWalkthroughThe PR adds wheel hit-test target recording controls and per-paintable caching. Sequence Diagram(s)sequenceDiagram
participant Paintable
participant DisplayListRecordingContext
participant ViewportPaintable
participant DisplayList
Paintable->>DisplayListRecordingContext: resolve cached wheel target
DisplayListRecordingContext-->>Paintable: return VisualContextIndex or no target
Paintable->>ViewportPaintable: check non-viewport scroll candidate
ViewportPaintable-->>Paintable: return candidate state
Paintable->>DisplayListRecordingContext: cache target or skip recording
DisplayListRecordingContext->>DisplayList: emit wheel target when required
Possibly related PRs
Suggested reviewers: Merge Risk: ⚪ Minimal · up to This change removes redundant viewport-only wheel target recording and updates coverage and display-list expectations; no actionable merge-blocking risk remains beyond normal checks and review. 🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Avoid recording per-box wheel hit test targets when the viewport is the only wheel-scrollable candidate. The compositor already falls back to the viewport after checking blocking and main-thread wheel regions.
Track non-viewport candidates while building the visual context tree, so viewport-only pages do not pay for another traversal. Memoize target resolution when element scrollers exist. Reject non-scrollable overflow styles before measuring overflow geometry.
Add coverage for viewport fallback without explicit targets. Update display list expectations to omit the redundant commands.